package llmserviceopenai.model

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class RerankRequest(
    val model: String,
    val query: String,
    val documents: List<String>,

    @SerialName("top_n")
    val topN: Int? = null
)

@Serializable
data class VLLMRerankResult(
    val index: Int,
    val relevance_score: Float
)

@Serializable
data class VLLMRerankResponse(
    val id: String? = null,
    val model: String,
    val results: List<VLLMRerankResult>,
    val usage: Map<String, Int>
)

@Serializable
data class RerankResponse(
    val results: List<RerankResultItem>
)

@Serializable
data class RerankResultItem(
    val index: Int,
    val score: Float,
    val text: String
)